package com.gxa.ssm340.controller;


import com.gxa.ssm340.common.R;
import com.gxa.ssm340.entity.pojo.Brand;
import com.gxa.ssm340.mapper.BrandMapper;
import com.gxa.ssm340.service.BrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "BrandController",tags = "品牌接口")
@RestController
@RequestMapping("/brand")
public class BrandController {

    @Autowired
    private BrandService brandService;

    @ApiOperation("品牌名字获取")
    @PostMapping("/nameList")
    public R nameList(){
        Brand[] brands = brandService.seletNameOfBrand();
        return R.success(brands);
    }
}
